/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Key Management Service
基于硬件保护密钥的安全数据托管服务

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKKms/KmsApiModel.h>


@implementation KmsDescribeSecretListRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation KmsDescribeSecretVersionInfoRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsEnableSecretVersionRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsCreateSecretResult
-(id) initWithSecretId:(NSString*) secretId { 
    self.secretId = secretId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDisableSecretVersionRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsEnableSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDisableSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDescribeSecretVersionListRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDeleteSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsExportSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsExportSecretResult
-(id) initWithSecretPackage:(NSString*) secretPackage { 
    self.secretPackage = secretPackage;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secretPackage])
    {
        [result setValue:[self secretPackage] forKey:@"secretPackage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretPackage = [dictionary objectForKey:@"secretPackage"];
    return self;
} 

@end
@implementation KmsDeleteSecretVersionRequest
-(id) initWithRegion:(NSString *)regionId
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsImportSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretPackage:(NSString*)secretPackage { 
    self.regionId = regionId;
    self.secretPackage = secretPackage;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretPackage:(NSString*)secretPackage { 
    self.regionId = regionId;
    self.version = version;
    self.secretPackage = secretPackage;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretPackage])
    {
        [result setValue:[self secretPackage] forKey:@"secretPackage"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretPackage = [dictionary objectForKey:@"secretPackage"];
    return self;
} 

@end
@implementation KmsGetPublicKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsKeyRotationRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsGenerateDataKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsEncryptResult
-(id) initWithCiphertextBlob:(NSString*) ciphertextBlob { 
    self.ciphertextBlob = ciphertextBlob;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ciphertextBlob])
    {
        [result setValue:[self ciphertextBlob] forKey:@"ciphertextBlob"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ciphertextBlob = [dictionary objectForKey:@"ciphertextBlob"];
    return self;
} 

@end
@implementation KmsEnableKeyVersionRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsValidateResult
-(id) initWithValidated:(NSNumber*) validated { 
    self.validated = validated;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self validated])
    {
        [result setValue:[self validated] forKey:@"validated"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.validated = [dictionary objectForKey:@"validated"];
    return self;
} 

@end
@implementation KmsGenerateDataKeyResult
-(id) initWithPlaintext:(NSString*) plaintext
        ciphertextBlob:(NSString*)ciphertextBlob { 
    self.plaintext = plaintext;               
    self.ciphertextBlob = ciphertextBlob;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self plaintext])
    {
        [result setValue:[self plaintext] forKey:@"plaintext"];
    }
    if([self ciphertextBlob])
    {
        [result setValue:[self ciphertextBlob] forKey:@"ciphertextBlob"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.plaintext = [dictionary objectForKey:@"plaintext"];
    self.ciphertextBlob = [dictionary objectForKey:@"ciphertextBlob"];
    return self;
} 

@end
@implementation KmsCancelKeyVersionDeletionRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsDecryptRequest
-(id) initWithRegion:(NSString *)regionId
ciphertextBlob:(NSString*)ciphertextBlob
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.ciphertextBlob = ciphertextBlob;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
ciphertextBlob:(NSString*)ciphertextBlob
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.ciphertextBlob = ciphertextBlob;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self ciphertextBlob])
    {
        [result setValue:[self ciphertextBlob] forKey:@"ciphertextBlob"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ciphertextBlob = [dictionary objectForKey:@"ciphertextBlob"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsGetPublicKeyResult
-(id) initWithPublicKeyBlob:(NSString*) publicKeyBlob { 
    self.publicKeyBlob = publicKeyBlob;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self publicKeyBlob])
    {
        [result setValue:[self publicKeyBlob] forKey:@"publicKeyBlob"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.publicKeyBlob = [dictionary objectForKey:@"publicKeyBlob"];
    return self;
} 

@end
@implementation KmsDescribeKeyListRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    return self;
} 

@end
@implementation KmsDescribeKeyDetailRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsScheduleKeyVersionDeletionRequest
-(id) initWithRegion:(NSString *)regionId
delayDays:(NSNumber*)delayDays
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.delayDays = delayDays;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
delayDays:(NSNumber*)delayDays
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.delayDays = delayDays;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self delayDays])
    {
        [result setValue:[self delayDays] forKey:@"delayDays"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.delayDays = [dictionary objectForKey:@"delayDays"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsValidateRequest
-(id) initWithRegion:(NSString *)regionId
plaintext:(NSString*)plaintext
signature:(NSString*)signature
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.plaintext = plaintext;
    self.signature = signature;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
plaintext:(NSString*)plaintext
signature:(NSString*)signature
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.plaintext = plaintext;
    self.signature = signature;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self plaintext])
    {
        [result setValue:[self plaintext] forKey:@"plaintext"];
    }
    if([self signature])
    {
        [result setValue:[self signature] forKey:@"signature"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.plaintext = [dictionary objectForKey:@"plaintext"];
    self.signature = [dictionary objectForKey:@"signature"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsCreateKeyResult
-(id) initWithKeyId:(NSString*) keyId { 
    self.keyId = keyId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsSignResult
-(id) initWithSignature:(NSString*) signature { 
    self.signature = signature;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self signature])
    {
        [result setValue:[self signature] forKey:@"signature"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.signature = [dictionary objectForKey:@"signature"];
    return self;
} 

@end
@implementation KmsCancelKeyDeletionRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsEncryptRequest
-(id) initWithRegion:(NSString *)regionId
plaintext:(NSString*)plaintext
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.plaintext = plaintext;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
plaintext:(NSString*)plaintext
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.plaintext = plaintext;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self plaintext])
    {
        [result setValue:[self plaintext] forKey:@"plaintext"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.plaintext = [dictionary objectForKey:@"plaintext"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsSignRequest
-(id) initWithRegion:(NSString *)regionId
plaintext:(NSString*)plaintext
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.plaintext = plaintext;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
plaintext:(NSString*)plaintext
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.plaintext = plaintext;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self plaintext])
    {
        [result setValue:[self plaintext] forKey:@"plaintext"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.plaintext = [dictionary objectForKey:@"plaintext"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsScheduleKeyDeletionRequest
-(id) initWithRegion:(NSString *)regionId
delayDays:(NSNumber*)delayDays
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.delayDays = delayDays;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
delayDays:(NSNumber*)delayDays
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.delayDays = delayDays;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self delayDays])
    {
        [result setValue:[self delayDays] forKey:@"delayDays"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.delayDays = [dictionary objectForKey:@"delayDays"];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsDisableKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsDescribeKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsEnableKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsDecryptResult
-(id) initWithPlaintext:(NSString*) plaintext { 
    self.plaintext = plaintext;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self plaintext])
    {
        [result setValue:[self plaintext] forKey:@"plaintext"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.plaintext = [dictionary objectForKey:@"plaintext"];
    return self;
} 

@end
@implementation KmsDisableKeyVersionRequest
-(id) initWithRegion:(NSString *)regionId
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsEnableSecretResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsEnableSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsEnableSecretResult* result = [[KmsEnableSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsEnableSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsEnableSecretVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsEnableSecretVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsEnableSecretVersionResult* result = [[KmsEnableSecretVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsEnableSecretVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsCreateSecretVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsCreateSecretVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsCreateSecretVersionResult* result = [[KmsCreateSecretVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsCreateSecretVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsUpdateSecretResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsUpdateSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretDescCfg:(SecretDescCfg*)secretDescCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretDescCfg = secretDescCfg;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretDescCfg:(SecretDescCfg*)secretDescCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretDescCfg = secretDescCfg;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretDescCfg])
    {
        [result setValue:[[self secretDescCfg] dictionary]forKey:@"secretDescCfg"];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretDescCfg = [[SecretDescCfg alloc]initWithDic:[dictionary objectForKey:@"secretDescCfg"]];
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDescribeSecretVersionListResult
-(id) initWithSecretDetail:(SecretDetail*) secretDetail { 
    self.secretDetail = secretDetail;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secretDetail])
    {
        [result setValue:[[self secretDetail] dictionary]forKey:@"secretDetail"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretDetail = [[SecretDetail alloc]initWithDic:[dictionary objectForKey:@"secretDetail"]];
    return self;
} 

@end
@implementation KmsDescribeSecretVersionInfoResult
-(id) initWithSecretVersionItem:(SecretVersionItem*) secretVersionItem { 
    self.secretVersionItem = secretVersionItem;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secretVersionItem])
    {
        [result setValue:[[self secretVersionItem] dictionary]forKey:@"secretVersionItem"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretVersionItem = [[SecretVersionItem alloc]initWithDic:[dictionary objectForKey:@"secretVersionItem"]];
    return self;
} 

@end
  
@implementation KmsDescribeSecretVersionInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeSecretVersionInfoResult* result = [[KmsDescribeSecretVersionInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeSecretVersionInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDescribeSecretVersionListResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeSecretVersionListResult* result = [[KmsDescribeSecretVersionListResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeSecretVersionListResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsCreateSecretVersionRequest
-(id) initWithRegion:(NSString *)regionId
secretVersionCfg:(SecretVersionCfg*)secretVersionCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretVersionCfg = secretVersionCfg;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretVersionCfg:(SecretVersionCfg*)secretVersionCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretVersionCfg = secretVersionCfg;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretVersionCfg])
    {
        [result setValue:[[self secretVersionCfg] dictionary]forKey:@"secretVersionCfg"];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretVersionCfg = [[SecretVersionCfg alloc]initWithDic:[dictionary objectForKey:@"secretVersionCfg"]];
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsDeleteSecretVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsDeleteSecretVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDeleteSecretVersionResult* result = [[KmsDeleteSecretVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDeleteSecretVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDeleteSecretResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsDeleteSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDeleteSecretResult* result = [[KmsDeleteSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDeleteSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDescribeSecretListResult
-(id) initWithSecretList:(NSArray<SecretInfo*>*) secretList
        totalCount:(NSNumber*)totalCount { 
    self.secretList = secretList;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self secretList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self secretList] count]; i++) {
            SecretInfo* item = [[self secretList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"secretList"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* secretListArray = [dictionary objectForKey:@"secretList"];
    if(secretListArray&&![secretListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [secretListArray count];i++)
        {
        SecretInfo* item = [[SecretInfo alloc]initWithDic:[secretListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.secretList = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation KmsCreateSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsCreateSecretResult* result = [[KmsCreateSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsCreateSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsUpdateSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsUpdateSecretResult* result = [[KmsUpdateSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsUpdateSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsUpdateSecretVersionRequest
-(id) initWithRegion:(NSString *)regionId
secretTimeCfg:(SecretTimeCfg*)secretTimeCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.secretTimeCfg = secretTimeCfg;
    self.secretId = secretId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretTimeCfg:(SecretTimeCfg*)secretTimeCfg
secretId:(NSString*)secretId { 
    self.regionId = regionId;
    self.version = version;
    self.secretTimeCfg = secretTimeCfg;
    self.secretId = secretId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretTimeCfg])
    {
        [result setValue:[[self secretTimeCfg] dictionary]forKey:@"secretTimeCfg"];
    }
    if([self secretId])
    {
        [result setValue:[self secretId] forKey:@"secretId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretTimeCfg = [[SecretTimeCfg alloc]initWithDic:[dictionary objectForKey:@"secretTimeCfg"]];
    self.secretId = [dictionary objectForKey:@"secretId"];
    return self;
} 

@end
@implementation KmsUpdateSecretVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsDisableSecretVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsImportSecretResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsCreateSecretRequest
-(id) initWithRegion:(NSString *)regionId
secretCfg:(SecretCfg*)secretCfg { 
    self.regionId = regionId;
    self.secretCfg = secretCfg;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
secretCfg:(SecretCfg*)secretCfg { 
    self.regionId = regionId;
    self.version = version;
    self.secretCfg = secretCfg;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self secretCfg])
    {
        [result setValue:[[self secretCfg] dictionary]forKey:@"secretCfg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.secretCfg = [[SecretCfg alloc]initWithDic:[dictionary objectForKey:@"secretCfg"]];
    return self;
} 

@end
@implementation KmsDisableSecretResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsDisableSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDisableSecretResult* result = [[KmsDisableSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDisableSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsImportSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsImportSecretResult* result = [[KmsImportSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsImportSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDisableSecretVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDisableSecretVersionResult* result = [[KmsDisableSecretVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDisableSecretVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDescribeSecretListResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeSecretListResult* result = [[KmsDescribeSecretListResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeSecretListResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsExportSecretResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsExportSecretResult* result = [[KmsExportSecretResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsExportSecretResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsUpdateSecretVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsUpdateSecretVersionResult* result = [[KmsUpdateSecretVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsUpdateSecretVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDisableKeyVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsDisableKeyVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDisableKeyVersionResult* result = [[KmsDisableKeyVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDisableKeyVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDescribeKeyResult
-(id) initWithKeyInfo:(KeyInfo*) keyInfo { 
    self.keyInfo = keyInfo;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self keyInfo])
    {
        [result setValue:[[self keyInfo] dictionary]forKey:@"keyInfo"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyInfo = [[KeyInfo alloc]initWithDic:[dictionary objectForKey:@"keyInfo"]];
    return self;
} 

@end
@implementation KmsDisableKeyResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsUpdateKeyDescriptionRequest
-(id) initWithRegion:(NSString *)regionId
keyCfg:(KeyCfg*)keyCfg
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.keyCfg = keyCfg;
    self.keyId = keyId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyCfg:(KeyCfg*)keyCfg
keyId:(NSString*)keyId { 
    self.regionId = regionId;
    self.version = version;
    self.keyCfg = keyCfg;
    self.keyId = keyId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyCfg])
    {
        [result setValue:[[self keyCfg] dictionary]forKey:@"keyCfg"];
    }
    if([self keyId])
    {
        [result setValue:[self keyId] forKey:@"keyId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyCfg = [[KeyCfg alloc]initWithDic:[dictionary objectForKey:@"keyCfg"]];
    self.keyId = [dictionary objectForKey:@"keyId"];
    return self;
} 

@end
@implementation KmsScheduleKeyVersionDeletionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsDisableKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDisableKeyResult* result = [[KmsDisableKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDisableKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsValidateResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsValidateResult* result = [[KmsValidateResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsValidateResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsSignResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsSignResult* result = [[KmsSignResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsSignResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsUpdateKeyDescriptionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsScheduleKeyDeletionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsScheduleKeyDeletionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsScheduleKeyDeletionResult* result = [[KmsScheduleKeyDeletionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsScheduleKeyDeletionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsGetPublicKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsGetPublicKeyResult* result = [[KmsGetPublicKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsGetPublicKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsEnableKeyVersionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsEnableKeyVersionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsEnableKeyVersionResult* result = [[KmsEnableKeyVersionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsEnableKeyVersionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsCancelKeyVersionDeletionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsCancelKeyVersionDeletionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsCancelKeyVersionDeletionResult* result = [[KmsCancelKeyVersionDeletionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsCancelKeyVersionDeletionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDescribeKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeKeyResult* result = [[KmsDescribeKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDescribeKeyDetailResult
-(id) initWithKeyDetail:(KeyDetail*) keyDetail { 
    self.keyDetail = keyDetail;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self keyDetail])
    {
        [result setValue:[[self keyDetail] dictionary]forKey:@"keyDetail"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyDetail = [[KeyDetail alloc]initWithDic:[dictionary objectForKey:@"keyDetail"]];
    return self;
} 

@end
@implementation KmsEnableKeyResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation KmsCancelKeyDeletionResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsCancelKeyDeletionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsCancelKeyDeletionResult* result = [[KmsCancelKeyDeletionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsCancelKeyDeletionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsGenerateDataKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsGenerateDataKeyResult* result = [[KmsGenerateDataKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsGenerateDataKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsScheduleKeyVersionDeletionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsScheduleKeyVersionDeletionResult* result = [[KmsScheduleKeyVersionDeletionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsScheduleKeyVersionDeletionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsKeyRotationResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation KmsKeyRotationResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsKeyRotationResult* result = [[KmsKeyRotationResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsKeyRotationResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsEncryptResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsEncryptResult* result = [[KmsEncryptResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsEncryptResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsUpdateKeyDescriptionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsUpdateKeyDescriptionResult* result = [[KmsUpdateKeyDescriptionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsUpdateKeyDescriptionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDecryptResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDecryptResult* result = [[KmsDecryptResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDecryptResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsEnableKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsEnableKeyResult* result = [[KmsEnableKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsEnableKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsCreateKeyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsCreateKeyResult* result = [[KmsCreateKeyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsCreateKeyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsDescribeKeyListResult
-(id) initWithKeyList:(NSArray<KeyInfo*>*) keyList
        totalCount:(NSNumber*)totalCount { 
    self.keyList = keyList;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self keyList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self keyList] count]; i++) {
            KeyInfo* item = [[self keyList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"keyList"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* keyListArray = [dictionary objectForKey:@"keyList"];
    if(keyListArray&&![keyListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [keyListArray count];i++)
        {
        KeyInfo* item = [[KeyInfo alloc]initWithDic:[keyListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.keyList = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation KmsDescribeKeyListResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeKeyListResult* result = [[KmsDescribeKeyListResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeKeyListResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation KmsDescribeKeyDetailResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
KmsDescribeKeyDetailResult* result = [[KmsDescribeKeyDetailResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(KmsDescribeKeyDetailResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation KmsCreateKeyRequest
-(id) initWithRegion:(NSString *)regionId
keyCfg:(KeyCfg*)keyCfg { 
    self.regionId = regionId;
    self.keyCfg = keyCfg;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
keyCfg:(KeyCfg*)keyCfg { 
    self.regionId = regionId;
    self.version = version;
    self.keyCfg = keyCfg;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self keyCfg])
    {
        [result setValue:[[self keyCfg] dictionary]forKey:@"keyCfg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.keyCfg = [[KeyCfg alloc]initWithDic:[dictionary objectForKey:@"keyCfg"]];
    return self;
} 

@end
 
